\(\int \frac {a+b x^2}{x^4 \sqrt {-1+c x} \sqrt {1+c x}} \, dx\) [356]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [C] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 29, antiderivative size = 62 \[ \int \frac {a+b x^2}{x^4 \sqrt {-1+c x} \sqrt {1+c x}} \, dx=\frac {a \sqrt {-1+c x} \sqrt {1+c x}}{3 x^3}+\frac {\left (3 b+2 a c^2\right ) \sqrt {-1+c x} \sqrt {1+c x}}{3 x} \]

[Out]

1/3*a*(c*x-1)^(1/2)*(c*x+1)^(1/2)/x^3+1/3*(2*a*c^2+3*b)*(c*x-1)^(1/2)*(c*x+1)^(1/2)/x

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {465, 97} \[ \int \frac {a+b x^2}{x^4 \sqrt {-1+c x} \sqrt {1+c x}} \, dx=\frac {\sqrt {c x-1} \sqrt {c x+1} \left (2 a c^2+3 b\right )}{3 x}+\frac {a \sqrt {c x-1} \sqrt {c x+1}}{3 x^3} \]

[In]

Int[(a + b*x^2)/(x^4*Sqrt[-1 + c*x]*Sqrt[1 + c*x]),x]

[Out]

(a*Sqrt[-1 + c*x]*Sqrt[1 + c*x])/(3*x^3) + ((3*b + 2*a*c^2)*Sqrt[-1 + c*x]*Sqrt[1 + c*x])/(3*x)

Rule 97

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[b*(a +
b*x)^(m + 1)*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/((m + 1)*(b*c - a*d)*(b*e - a*f))), x] /; FreeQ[{a, b, c, d,
 e, f, m, n, p}, x] && EqQ[Simplify[m + n + p + 3], 0] && EqQ[a*d*f*(m + 1) + b*c*f*(n + 1) + b*d*e*(p + 1), 0
] && NeQ[m, -1]

Rule 465

Int[((e_.)*(x_))^(m_.)*((a1_) + (b1_.)*(x_)^(non2_.))^(p_.)*((a2_) + (b2_.)*(x_)^(non2_.))^(p_.)*((c_) + (d_.)
*(x_)^(n_)), x_Symbol] :> Simp[c*(e*x)^(m + 1)*(a1 + b1*x^(n/2))^(p + 1)*((a2 + b2*x^(n/2))^(p + 1)/(a1*a2*e*(
m + 1))), x] + Dist[(a1*a2*d*(m + 1) - b1*b2*c*(m + n*(p + 1) + 1))/(a1*a2*e^n*(m + 1)), Int[(e*x)^(m + n)*(a1
 + b1*x^(n/2))^p*(a2 + b2*x^(n/2))^p, x], x] /; FreeQ[{a1, b1, a2, b2, c, d, e, p}, x] && EqQ[non2, n/2] && Eq
Q[a2*b1 + a1*b2, 0] && (IntegerQ[n] || GtQ[e, 0]) && ((GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1
])) &&  !ILtQ[p, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {a \sqrt {-1+c x} \sqrt {1+c x}}{3 x^3}+\frac {1}{3} \left (3 b+2 a c^2\right ) \int \frac {1}{x^2 \sqrt {-1+c x} \sqrt {1+c x}} \, dx \\ & = \frac {a \sqrt {-1+c x} \sqrt {1+c x}}{3 x^3}+\frac {\left (3 b+2 a c^2\right ) \sqrt {-1+c x} \sqrt {1+c x}}{3 x} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.14 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.68 \[ \int \frac {a+b x^2}{x^4 \sqrt {-1+c x} \sqrt {1+c x}} \, dx=\frac {\sqrt {-1+c x} \sqrt {1+c x} \left (a+3 b x^2+2 a c^2 x^2\right )}{3 x^3} \]

[In]

Integrate[(a + b*x^2)/(x^4*Sqrt[-1 + c*x]*Sqrt[1 + c*x]),x]

[Out]

(Sqrt[-1 + c*x]*Sqrt[1 + c*x]*(a + 3*b*x^2 + 2*a*c^2*x^2))/(3*x^3)

Maple [A] (verified)

Time = 4.02 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.60

method result size
gosper \(\frac {\sqrt {c x +1}\, \sqrt {c x -1}\, \left (2 a \,c^{2} x^{2}+3 b \,x^{2}+a \right )}{3 x^{3}}\) \(37\)
risch \(\frac {\sqrt {c x +1}\, \sqrt {c x -1}\, \left (2 a \,c^{2} x^{2}+3 b \,x^{2}+a \right )}{3 x^{3}}\) \(37\)
default \(\frac {\sqrt {c x -1}\, \sqrt {c x +1}\, \operatorname {csgn}\left (c \right )^{2} \left (2 a \,c^{2} x^{2}+3 b \,x^{2}+a \right )}{3 x^{3}}\) \(41\)

[In]

int((b*x^2+a)/x^4/(c*x-1)^(1/2)/(c*x+1)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/3*(c*x+1)^(1/2)*(c*x-1)^(1/2)*(2*a*c^2*x^2+3*b*x^2+a)/x^3

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.84 \[ \int \frac {a+b x^2}{x^4 \sqrt {-1+c x} \sqrt {1+c x}} \, dx=\frac {{\left (2 \, a c^{3} + 3 \, b c\right )} x^{3} + {\left ({\left (2 \, a c^{2} + 3 \, b\right )} x^{2} + a\right )} \sqrt {c x + 1} \sqrt {c x - 1}}{3 \, x^{3}} \]

[In]

integrate((b*x^2+a)/x^4/(c*x-1)^(1/2)/(c*x+1)^(1/2),x, algorithm="fricas")

[Out]

1/3*((2*a*c^3 + 3*b*c)*x^3 + ((2*a*c^2 + 3*b)*x^2 + a)*sqrt(c*x + 1)*sqrt(c*x - 1))/x^3

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 10.92 (sec) , antiderivative size = 146, normalized size of antiderivative = 2.35 \[ \int \frac {a+b x^2}{x^4 \sqrt {-1+c x} \sqrt {1+c x}} \, dx=- \frac {a c^{3} {G_{6, 6}^{5, 3}\left (\begin {matrix} \frac {9}{4}, \frac {11}{4}, 1 & \frac {5}{2}, \frac {5}{2}, 3 \\2, \frac {9}{4}, \frac {5}{2}, \frac {11}{4}, 3 & 0 \end {matrix} \middle | {\frac {1}{c^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}}} - \frac {i a c^{3} {G_{6, 6}^{2, 6}\left (\begin {matrix} \frac {3}{2}, \frac {7}{4}, 2, \frac {9}{4}, \frac {5}{2}, 1 & \\\frac {7}{4}, \frac {9}{4} & \frac {3}{2}, 2, 2, 0 \end {matrix} \middle | {\frac {e^{2 i \pi }}{c^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}}} - \frac {b c {G_{6, 6}^{5, 3}\left (\begin {matrix} \frac {5}{4}, \frac {7}{4}, 1 & \frac {3}{2}, \frac {3}{2}, 2 \\1, \frac {5}{4}, \frac {3}{2}, \frac {7}{4}, 2 & 0 \end {matrix} \middle | {\frac {1}{c^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}}} - \frac {i b c {G_{6, 6}^{2, 6}\left (\begin {matrix} \frac {1}{2}, \frac {3}{4}, 1, \frac {5}{4}, \frac {3}{2}, 1 & \\\frac {3}{4}, \frac {5}{4} & \frac {1}{2}, 1, 1, 0 \end {matrix} \middle | {\frac {e^{2 i \pi }}{c^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}}} \]

[In]

integrate((b*x**2+a)/x**4/(c*x-1)**(1/2)/(c*x+1)**(1/2),x)

[Out]

-a*c**3*meijerg(((9/4, 11/4, 1), (5/2, 5/2, 3)), ((2, 9/4, 5/2, 11/4, 3), (0,)), 1/(c**2*x**2))/(4*pi**(3/2))
- I*a*c**3*meijerg(((3/2, 7/4, 2, 9/4, 5/2, 1), ()), ((7/4, 9/4), (3/2, 2, 2, 0)), exp_polar(2*I*pi)/(c**2*x**
2))/(4*pi**(3/2)) - b*c*meijerg(((5/4, 7/4, 1), (3/2, 3/2, 2)), ((1, 5/4, 3/2, 7/4, 2), (0,)), 1/(c**2*x**2))/
(4*pi**(3/2)) - I*b*c*meijerg(((1/2, 3/4, 1, 5/4, 3/2, 1), ()), ((3/4, 5/4), (1/2, 1, 1, 0)), exp_polar(2*I*pi
)/(c**2*x**2))/(4*pi**(3/2))

Maxima [A] (verification not implemented)

none

Time = 0.36 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.87 \[ \int \frac {a+b x^2}{x^4 \sqrt {-1+c x} \sqrt {1+c x}} \, dx=\frac {2 \, \sqrt {c^{2} x^{2} - 1} a c^{2}}{3 \, x} + \frac {\sqrt {c^{2} x^{2} - 1} b}{x} + \frac {\sqrt {c^{2} x^{2} - 1} a}{3 \, x^{3}} \]

[In]

integrate((b*x^2+a)/x^4/(c*x-1)^(1/2)/(c*x+1)^(1/2),x, algorithm="maxima")

[Out]

2/3*sqrt(c^2*x^2 - 1)*a*c^2/x + sqrt(c^2*x^2 - 1)*b/x + 1/3*sqrt(c^2*x^2 - 1)*a/x^3

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 116 vs. \(2 (50) = 100\).

Time = 0.29 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.87 \[ \int \frac {a+b x^2}{x^4 \sqrt {-1+c x} \sqrt {1+c x}} \, dx=\frac {8 \, {\left (3 \, b c^{2} {\left (\sqrt {c x + 1} - \sqrt {c x - 1}\right )}^{8} + 24 \, a c^{4} {\left (\sqrt {c x + 1} - \sqrt {c x - 1}\right )}^{4} + 24 \, b c^{2} {\left (\sqrt {c x + 1} - \sqrt {c x - 1}\right )}^{4} + 32 \, a c^{4} + 48 \, b c^{2}\right )}}{3 \, {\left ({\left (\sqrt {c x + 1} - \sqrt {c x - 1}\right )}^{4} + 4\right )}^{3} c} \]

[In]

integrate((b*x^2+a)/x^4/(c*x-1)^(1/2)/(c*x+1)^(1/2),x, algorithm="giac")

[Out]

8/3*(3*b*c^2*(sqrt(c*x + 1) - sqrt(c*x - 1))^8 + 24*a*c^4*(sqrt(c*x + 1) - sqrt(c*x - 1))^4 + 24*b*c^2*(sqrt(c
*x + 1) - sqrt(c*x - 1))^4 + 32*a*c^4 + 48*b*c^2)/(((sqrt(c*x + 1) - sqrt(c*x - 1))^4 + 4)^3*c)

Mupad [B] (verification not implemented)

Time = 6.72 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.85 \[ \int \frac {a+b x^2}{x^4 \sqrt {-1+c x} \sqrt {1+c x}} \, dx=\frac {\sqrt {c\,x-1}\,\left (\left (\frac {2\,a\,c^3}{3}+b\,c\right )\,x^3+\left (\frac {2\,a\,c^2}{3}+b\right )\,x^2+\frac {a\,c\,x}{3}+\frac {a}{3}\right )}{x^3\,\sqrt {c\,x+1}} \]

[In]

int((a + b*x^2)/(x^4*(c*x - 1)^(1/2)*(c*x + 1)^(1/2)),x)

[Out]

((c*x - 1)^(1/2)*(a/3 + x^3*(b*c + (2*a*c^3)/3) + x^2*(b + (2*a*c^2)/3) + (a*c*x)/3))/(x^3*(c*x + 1)^(1/2))